{
  "info": {
    "_postman_id": "b391e1d4-4b56-4083-ba39-3ba53bef8398",
    "name": "Протокол 1.4 Физиотерапия (обновлено)",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "37937048"
  },
  "item": [
    {
      "name": "Предварительные условия",
      "item": [
        {
          "name": "Достать врача и организацию из токена врача и добавить в переменную",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "const jwt = pm.request.auth.oauth2.get(\"accessToken\");\r",
                  "console.log(jwt);\r",
                  "if (jwt) {\r",
                  "    let payload = jwt.split('.')[1];\r",
                  "    payload = payload.replace(/-/g, '+').replace(/_/g, '/');\r",
                  "    while (payload.length % 4) payload += '=';\r",
                  "    let decoded = JSON.parse(atob(payload));\r",
                  "    console.log(decoded)\r",
                  "    let practitionerId = decoded.practitioner_id || decoded.practitionerId || decoded[\"practitioner_id\"];\r",
                  "    let organizationId = decoded.organization_id || decoded.organizationId || decoded[\"organization_id\"];\r",
                  "    if (practitionerId) pm.environment.set(\"PractitionerId\", practitionerId);\r",
                  "    if (organizationId) pm.environment.set(\"OrganizationId\", organizationId);\r",
                  "} else {\r",
                  "    console.log(\"JWT токен не найден в переменных коллекции\");\r",
                  "}"
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "0.3.4934",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": ""
            },
            "url": {
              "raw": "https://postman-echo.com/get",
              "protocol": "https",
              "host": [
                "postman-echo",
                "com"
              ],
              "path": [
                "get"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Достать PractitionerRole врача (PractitionerRole)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var jsonData = pm.response.json();\r\nlet practitionerRole = jsonData.entry.find(obj => obj.resource.resourceType === \"PractitionerRole\").resource.id;\r\n\r\npm.environment.set(\"PractitionerRole\", practitionerRole);\r\nconsole.log(practitionerRole)\r\n"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/PractitionerRole?practitioner={{PractitionerId}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "PractitionerRole"
              ],
              "query": [
                {
                  "key": "practitioner",
                  "value": "{{PractitionerId}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Достать структурное подразделение врача (LocationId)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "let json = pm.response.json();\r\nlet locationValue = null;\r\n\r\nif (Array.isArray(json.entry)) {\r\n    for (let entry of json.entry) {\r\n        if (\r\n            entry.resource &&\r\n            entry.resource.resourceType === \"PractitionerRole\" &&\r\n            Array.isArray(entry.resource.location) &&\r\n            entry.resource.location.length > 0\r\n        ) {\r\n            // Берём reference первого location и извлекаем только UUID\r\n            let ref = entry.resource.location[0].reference;\r\n            if (typeof ref === \"string\" && ref.startsWith(\"Location/\")) {\r\n                locationValue = ref.split(\"/\")[1]; // или: ref.replace(\"Location/\", \"\")\r\n            }\r\n            break;\r\n        }\r\n    }\r\n}\r\n\r\nif (locationValue) {\r\n    pm.environment.set(\"LocationId\", locationValue);\r\n    console.log(\"location сохранён:\", locationValue);\r\n} else {\r\n    console.log(\"location не найден\");\r\n}\r\n"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/PractitionerRole?_id={{PractitionerRole}}",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "PractitionerRole"
              ],
              "query": [
                {
                  "key": "_id",
                  "value": "{{PractitionerRole}}"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Создание пациента",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r\n    pm.response.to.have.status(202);\r\n});\r\n\r\nvar jsonData = pm.response.json();\r\nlet bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r\nlet statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r\n\r\nconsole.log(statusReference.valueReference.reference);\r\n\r\npm.collectionVariables.set(\"bundleId\", bundleId);\r\npm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r\n"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551355A009PB4\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2022-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"Minsk\",\r\n                                                    \"display\": \"Минск\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.10\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP1253212\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375123456789\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.2\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"517030229743858774\",\r\n                                            \"display\": \"Минск, г. Минск, Улица Уручская, д. 23 к.1201\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Улица Уручская\"\r\n                    }\r\n                ]\r\n            }",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Поиск пациента по идентификатору (patientId)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "var jsonData = pm.response.json();\r\nlet patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r\n\r\npm.collectionVariables.set(\"patientId\", patientId);\r\nconsole.log(patientId)\r\n"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551355A009PB4",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551355A009PB4"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Прохождение курса физиотерапии в амбулаторных условиях",
      "item": [
        {
          "name": "Метод импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r\n    pm.response.to.have.status(202);\r\n});\r\n\r\nvar jsonData = pm.response.json();\r\nlet bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r\nlet statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r\n\r\nconsole.log(statusReference.valueReference.reference);\r\n\r\npm.collectionVariables.set(\"bundleId\", bundleId);\r\npm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r\n"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"BundlePhysioProcedureTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"{{$isoTimestamp}}\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionPhysioProcedureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionPhysioProcedureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-12\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle по физиотерапии\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n               \r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"ExamplePatientWithIdentificationNumber\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientED\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DocumentKind\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DigitalDocumentKind\",\r\n                                    \"code\": \"00\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551355A009PB4\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n               \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"gender\": \"male\",\r\n                \"telecom\": [\r\n                    {\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"+375291112233\"\r\n                    }\r\n                ],\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"2938771891184418\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 101\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"Витебская область, г. Витебск, Улица 19-я Городокская, д. 5\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.3\",\r\n                                            \"code\": \"12463236041049757\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 1201\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"Брестская область, г. Пинск, Улица Центральная, д. 9\"\r\n                    }\r\n                ],\r\n                \"link\": [\r\n                    {\r\n                        \"other\": {\r\n                            \"reference\": \"Patient/{{patientId}}\"\r\n                        },\r\n                        \"type\": \"refer\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/DiagnosisKneeFractureTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"DiagnosisKneeFractureTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2025-12-10\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"S52.40\",\r\n                            \"display\": \"S52.40 - Сочетанный перелом диафизов локтевой и лучевой костей закрытый\"\r\n                        }\r\n                    ],\r\n                    \"text\": \"Сочетанный перелом диафизов левой локтевой и лучевой костей закрытый\"\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\"\r\n                },\r\n                \"onsetDateTime\": \"2025-12-10\",\r\n                \"recordedDate\": \"2025-12-10\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Procedure/ExamplePhysiotherapyProcedureMagnitTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Procedure\",\r\n                \"id\": \"ExamplePhysiotherapyProcedureMagnitTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PhysiotherapyProcedure\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ProcedureNumber\",\r\n                        \"valueUnsignedInt\": 5\r\n                    }\r\n                ],\r\n                \r\n                \"status\": \"completed\",\r\n                \"category\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/HealthcareServiceCategory\",\r\n                                \"code\": \"02/1\",\r\n                                \"display\": \"Амбулаторно-поликлиническая помощь взрослому населению\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/VSPhysioHealthcareService\",\r\n                            \"code\": \"A17-30-025\",\r\n                            \"display\": \"Общая магнитотерапия\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/{{patientId}}\"\r\n                },\r\n                \"occurrencePeriod\": {\r\n                    \"start\": \"2025-12-12T12:20:00Z\",\r\n                    \"end\": \"2025-12-25T12:20:00Z\"\r\n                },\r\n                \"recorded\": \"2025-12-25T12:20:00Z\",\r\n                \"recorder\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"performer\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"location\": {\r\n                    \"reference\": \"Location/{{LocationId}}\"\r\n                },\r\n                \"reason\": [\r\n                    {\r\n                        \"reference\": {\r\n                            \"reference\": \"Condition/DiagnosisKneeFractureTest\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"bodySite\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/AnatomicalTerminology\",\r\n                                \"code\": \"Forearm-L\",\r\n                                \"display\": \"Предплечье (лев.)\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"outcome\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/ProcedureResult\",\r\n                            \"code\": \"successful\",\r\n                            \"display\": \"Успешно\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"followUp\": [\r\n                    {\r\n                        \"text\": \"Рекомендуется 20 минут после процедуры не выходить на холод.\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n        \r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод получения статуса импорта пакета медицинской информации",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Метод проверки наличия Процедуры физиотерапии",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/Procedure?_profile=https://fhir.by/StructureDefinition/PhysiotherapyProcedure&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "Procedure"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/PhysiotherapyProcedure"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Получение сводной информации о пациенте",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/$everything?start=2025-10&end=2025-12",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "$everything"
              ],
              "query": [
                {
                  "key": "start",
                  "value": "2025-10"
                },
                {
                  "key": "end",
                  "value": "2025-12"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "clientId",
        "value": "mis_agsr_web_application",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "https://preprod.cisz.by/auth/api/realms/iehr/token",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "https://preprod.cisz.by/auth/api/realms/iehr/auth",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      },
      {
        "key": "challengeAlgorithm",
        "value": "S256",
        "type": "string"
      },
      {
        "key": "clientSecret",
        "value": "",
        "type": "string"
      },
      {
        "key": "scope",
        "value": "profile email acr realm roles",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      },
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "authorization_code_with_pkce",
        "type": "string"
      },
      {
        "key": "refreshRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "tokenRequestParams",
        "value": [
          {
            "key": "origin",
            "value": "https://oauth.pstmn.io/v1/callback",
            "enabled": true,
            "send_as": "request_header"
          }
        ],
        "type": "any"
      },
      {
        "key": "authRequestParams",
        "value": [],
        "type": "any"
      },
      {
        "key": "useBrowser",
        "value": false,
        "type": "boolean"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "practitioner_id",
      "value": ""
    },
    {
      "key": "organization_id",
      "value": ""
    },
    {
      "key": "locationId",
      "value": ""
    },
    {
      "key": "patientId",
      "value": ""
    },
    {
      "key": "bundleId",
      "value": ""
    },
    {
      "key": "StatusUrl",
      "value": ""
    },
    {
      "key": "ServiceRequestMagnit",
      "value": ""
    },
    {
      "key": "ServiceRequestMassage",
      "value": ""
    },
    {
      "key": "ConditionId",
      "value": ""
    }
  ]
}